package org.efficientsoap.test.testserver;

import java.util.ArrayList;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.xml.bind.annotation.XmlElement;

import org.efficientsoap.test.datatypes.ComplexData;
import org.efficientsoap.test.datatypes.PrimitiveData;
import org.efficientsoap.test.datatypes.RecursiveData;
import org.efficientsoap.test.datatypes.SimpleData;

/*
 * a Service Endpoint Interface for Testing
 */

	@WebService(name = "EfficientSoapTestService", targetNamespace = "http://efficientsoap.org/test")
	@SOAPBinding(style = Style.RPC)
	public interface ITestService {

		@WebMethod
		@WebResult(partName = "stringReturn")
		String stringInOut(@WebParam(name = "stringParam") String stringParam);
		
		@WebMethod
		//@WebResult(partName = "booleanListReturn")
		//using JAX-B Annotation for List interface handling
		@XmlElement(name="booleanListReturn", required=true)
		ArrayList<Boolean> doubleInBooleanListOut(double doubleParam);
			
		@WebMethod
		@WebResult(partName = "primitiveReturn")
		PrimitiveData generatePrimitiveData(int integerParam);
		
		@WebMethod
		@WebResult(partName = "simpleReturn")
		SimpleData generateSimpleData(long longParam);

		@WebMethod
		@WebResult(partName = "complexReturn")
		ComplexData generateComplexData(SimpleData simpleParam);
		
		@WebMethod
		@WebResult(partName = "recursiveReturn")
		RecursiveData generateRecursiveData(ComplexData complexParam);
		
		@WebMethod
		int multiParamMethod(String param1, RecursiveData param2, ArrayList<Long> param3, ArrayList<PrimitiveData> param4);
	}
